import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
import home from '../views/tabbar/homeContainer.vue'
import member from '../views/tabbar/memberContainer.vue'
import search from '../views/tabbar/searchContainer.vue'
import shopping from '../views/tabbar/shoppingContainer.vue'
import newslist from '../views/news/newslist.vue'
import goodslist from '../views/goods/goodslist.vue'
import newsinfo from '../views/news/newsinfo.vue'
import photolist from '../views/photos/photolist.vue'
import { comment } from 'postcss';
import photoinfo from '../views/photos/photoinfo.vue'
import goodsinfo from '../views/goods/goodsinfo.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: "/",
      redirect: "/home"
    },
    {
      path: '/home',
      component: home
    },
    {
      path: '/member',
      component: member
    },
    {
      path: '/search',
      component: search
    },
    {
      path: '/shopping',
      component: shopping
    },
    {
      path: '/home/newslist',
      component: newslist
    },
    {
      path: '/home/photolist',
      component: photolist
    },
    {
      path: '/home/goodslist',
      component: goodslist
    },
    {
      path: '/home/newsinfo/:id',
      component: newsinfo,
      // children:[{                         //有用吗？
      //   path:'home/newsinfo/:id',         //有用吗？
      //   component:comment                 //有用吗？
      // }]                                  //有用吗？
    },
    {
      path: '/home/photoinfo/:id',
      component: photoinfo
    },
    {
      path: '/home/goodsinfo/:id',
      component: goodsinfo
    },
  ]
})
